package com.rc.saas.tenant.service.hlhtsk;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseSearch;
import com.rc.saas.tenant.mapper.hlhtsk.HlhtskBizOperatorMapper;
import com.rc.saas.tenant.model.hlhtsk.HlhtskBizOperator;
import com.rc.saas.tenant.model.hlhtsk.HlhtskBizOperatorExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author frog
 * @date 2021/4/20
 */
@Service
public class HlhtskBizOperatorServiceImpl implements HlhtskBizOperatorService {

    @Autowired
    private HlhtskBizOperatorMapper hlhtskBizOperatorMapper;

    @Override
    public HlhtskBizOperatorMapper getMapper() {
        return hlhtskBizOperatorMapper;
    }

    @Override
    public PageInfo<HlhtskBizOperator> listPageHlhtskBizOperator(BaseSearch baseSearch) {
        PageHelper.startPage(baseSearch.getOffset(), baseSearch.getLimit());
        HlhtskBizOperatorExample example = new HlhtskBizOperatorExample();
        List<HlhtskBizOperator> hlhtskBizOperators = hlhtskBizOperatorMapper.selectByExample(example);
        return new PageInfo<HlhtskBizOperator>(hlhtskBizOperators);
    }
}
